package com.enation.app.javashop.core.trade.order.model.vo;

import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

import java.io.Serializable;

/**
 * 历史发票
 *
 * @author Snow create in 2018/6/27
 * @version v2.0
 * @since v7.0.0
 */
public class ReceiptHistoryVO implements Serializable{

    private static final long serialVersionUID = -1694716929366454200L;
    /**是否需要发票*/
    @ApiModelProperty(name="need_receipt",value="是否需要发票",required=false)
    private String needReceipt;

    /**发票抬头*/
    @ApiModelProperty(name="receipt_title",value="发票抬头",required=false)
    private String receiptTitle;

    /**发票内容*/
    @ApiModelProperty(name="receipt_content",value="发票内容",required=false)
    private String receiptContent;

    /**税号*/
    @ApiModelProperty(name="duty_invoice",value="税号",required=false)
    private String dutyInvoice;

    /**发票类型*/
    @ApiModelProperty(name="receipt_type",value="发票类型",required=false)
    private String receiptType;

    @ApiModelProperty(name="create_time",value="订单创建时间",required=false)
    private Long createTime;

    @ApiModelProperty(name="sn",value="订单编号",required=false)
    private String sn;

    @ApiModelProperty(name="need_pay_money",value="应付金额",required=false)
    private Double needPayMoney;

    @ApiModelProperty(name="member_id",value="会员ID",required=false)
    private Integer memberId;

    @ApiModelProperty(name="member_name",value="买家账号",required=false)
    private String memberName;


    public String getNeedReceipt() {
        return needReceipt;
    }

    public void setNeedReceipt(String needReceipt) {
        this.needReceipt = needReceipt;
    }

    public String getReceiptTitle() {
        return receiptTitle;
    }

    public void setReceiptTitle(String receiptTitle) {
        this.receiptTitle = receiptTitle;
    }

    public String getReceiptContent() {
        return receiptContent;
    }

    public void setReceiptContent(String receiptContent) {
        this.receiptContent = receiptContent;
    }

    public String getDutyInvoice() {
        return dutyInvoice;
    }

    public void setDutyInvoice(String dutyInvoice) {
        this.dutyInvoice = dutyInvoice;
    }

    public String getReceiptType() {
        return receiptType;
    }

    public void setReceiptType(String receiptType) {
        this.receiptType = receiptType;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Double getNeedPayMoney() {
        return needPayMoney;
    }

    public void setNeedPayMoney(Double needPayMoney) {
        this.needPayMoney = needPayMoney;
    }

    public Integer getMemberId() {
        return memberId;
    }

    public void setMemberId(Integer memberId) {
        this.memberId = memberId;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    @Override
    public String toString() {
        return "ReceiptHistoryVO{" +
                "needReceipt='" + needReceipt + '\'' +
                ", receiptTitle='" + receiptTitle + '\'' +
                ", receiptContent='" + receiptContent + '\'' +
                ", dutyInvoice='" + dutyInvoice + '\'' +
                ", receiptType='" + receiptType + '\'' +
                ", createTime=" + createTime +
                ", sn='" + sn + '\'' +
                ", needPayMoney=" + needPayMoney +
                ", memberId=" + memberId +
                ", memberName='" + memberName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }

        if (o == null || getClass() != o.getClass()){
            return false;
        }

        ReceiptHistoryVO that = (ReceiptHistoryVO) o;

        return new EqualsBuilder()
                .append(needReceipt, that.needReceipt)
                .append(receiptTitle, that.receiptTitle)
                .append(receiptContent, that.receiptContent)
                .append(dutyInvoice, that.dutyInvoice)
                .append(receiptType, that.receiptType)
                .append(createTime, that.createTime)
                .append(sn, that.sn)
                .append(needPayMoney, that.needPayMoney)
                .append(memberId, that.memberId)
                .append(memberName, that.memberName)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(needReceipt)
                .append(receiptTitle)
                .append(receiptContent)
                .append(dutyInvoice)
                .append(receiptType)
                .append(createTime)
                .append(sn)
                .append(needPayMoney)
                .append(memberId)
                .append(memberName)
                .toHashCode();
    }
}
